/*    file: SdlDoubleClick.h
 *    desc:
 *   
 * created: 2014-04-19 09:26:16
 *  author: zhengchuanjiang
 * company: 
 */ 


#if !defined SDLDOUBLECLICK_H_
#define SDLDOUBLECLICK_H_

#include <SDL.h>
////////////////////////////////////////////////////////////////////////////
namespace sdl
{

class DoubleClick
{
public:
    DoubleClick();
    ~DoubleClick();

    bool isDoubleClick(SDL_Event& sdlEvent);

    void setClickElapse(Uint32 ms);

private:
    void reset();

private:
    Uint32  m_ticks;
    Uint32  m_elapse;


};


}
////////////////////////////////////////////////////////////////////////////
#endif //SDLDOUBLECLICK_H_

